<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/common/tags.jspf" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<template:header context="${context}" title="Users - Redmine"/>
</head>

<body class="theme-Alternate controller-users action-index">
	<template:content context="${context}" session="${session}" sidebar="admin" menus="${adminMenus}">
		 <div class="contextual">
			<a href="${context}/admin/users/new" class="icon icon-add">New user</a>
		</div>

		<h2>Users</h2>
		
		<form accept-charset="UTF-8" action="/users" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
		<fieldset><legend>Filters</legend>
		<label for='status'>Status:</label>
		<select class="small" id="status" name="status" onchange="this.form.submit(); return false;"><option value="">all</option>
		<option value="1" selected="selected">active (9)</option>
		<option value="2">registered (0)</option>
		<option value="3">locked (0)</option></select>
		
		<label for='group_id'>Group:</label>
		<select id="group_id" name="group_id" onchange="this.form.submit(); return false;"><option></option><option value="9">SME 기획</option>
		<option value="8">SME 운영</option></select>
		
		<label for='name'>User:</label>
		<input id="name" name="name" size="30" type="text" />
		<input class="small" type="submit" value="Apply" />
		<a href="/users" class="icon icon-reload">Clear</a>
		</fieldset>
		</form>&nbsp;
		
		<div class="autoscroll">
		<table class="list">
			<thead><tr>
				<th title="Sort by &quot;Login&quot;"><a href="/users?sort=login%3Adesc" class="sort asc">Login</a></th>
				<th title="Sort by &quot;First name&quot;"><a href="/users?sort=firstname%2Clogin">First name</a></th>
				<th title="Sort by &quot;Last name&quot;"><a href="/users?sort=lastname%2Clogin">Last name</a></th>
				<th title="Sort by &quot;Email&quot;"><a href="/users?sort=mail%2Clogin">Email</a></th>
				<th title="Sort by &quot;Administrator&quot;"><a href="/users?sort=admin%3Adesc%2Clogin">Administrator</a></th>
				<th title="Sort by &quot;Created&quot;"><a href="/users?sort=created_on%3Adesc%2Clogin">Created</a></th>
				<th title="Sort by &quot;Last connection&quot;"><a href="/users?sort=last_login_on%3Adesc%2Clogin">Last connection</a></th>
				<th></th>
			</tr></thead>
			<tbody>
				<ui:tr var="user" items="${users}" type="user" style="active">
					<jsp:attribute name="td">
						<td class="username">
							<img alt="" class="gravatar" default="mm" rating="PG" src="http://www.gravatar.com/avatar/cb4f282fed12016bd18a879c1f27ff97?rating=PG&amp;size=14&amp;default=mm" ssl="false" title="" />
							<a href="/users/${user.seq}/edit">${user.id}</a>
						</td>
						<td class="firstname">${user.firstName}</td>
						<td class="lastname">${user.lastName}</td>
						<td class="email"><a href="mailto:${user.email}">${user.email}</a></td>
						<td align="center">
							<c:if test="${user.admin == true}">
								<img alt="Toggle_check" src="${context}/public/images/toggle_check.png?1337008990" />
							</c:if>
						</td>
						<td class="created_on" align="center">${user.localCreatedTime}</td>
						<td class="last_login_on" align="center">${user.localLastLoginTime}</td>
						<td class="buttons">
							<a href="/users/${user.seq}?user%5Bstatus%5D=3" class="icon icon-lock" data-method="put" rel="nofollow">Lock</a>
							<a href="/users/${user.seq}" class="icon icon-del" data-confirm="Are you sure?" data-method="delete" rel="nofollow">Delete</a>
						</td>
					</jsp:attribute>
				</ui:tr>
			</tbody>
		</table>
		</div>
		<p class="pagination"> (1-9/9)</p>        
        <div style="clear:both;"></div>
	</template:content>
</body>
</html>

